<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-product-edit" th:object="${functionRule}">
			<div class="form-group" >
				<label class="col-sm-3 control-label">规则编码：</label>
				<div class="col-sm-8">
					<input id="ruleCode" name="ruleCode" class="form-control" type="text" readonly="readonly" th:field="*{ruleCode}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入参KEY：</label>
				<div class="col-sm-8">
					<input id="ruleKey" name="ruleKey" class="form-control" type="text" readonly="readonly" th:field="*{ruleKey}">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">参数VALUE<span style="color:red;">*</span>：</label>
				<div class="col-sm-8">
					<textarea id="ruleValue" name="ruleValue" class="form-control"  rows="5" maxlength="800" th:field="*{ruleValue}"></textarea>
				</div>
			</div>
			<input type="hidden" id="id" name="id" th:field="*{id}">
			<input type="hidden" id="appCode" name="appCode" th:field="*{appCode}">
			<input type="hidden" id="interfaceCode" name="interfaceCode" th:field="*{interfaceCode}">
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		$(function () {

		})

		var prefix = ctx+"functionRule"
		$("#form-product-edit").validate({
			rules:{
				ruleValue:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
